package com.coolgor.coldot.enums.wechat.gzh;

public enum GZHUserOperationStateEnum {
	SUCCESS(1000, "操作成功"),
	INNER_ERROR(-1001, "内部系统错误"),
	NULL(-1002, "信息为空"),
	NULL_ID(-1003, "ID为空"),
	EMPTY_LIST(-1004, "数据列表为空");

	private int state;

	private String stateInfo;

	private GZHUserOperationStateEnum(int state, String stateInfo) {
		this.state = state;
		this.stateInfo = stateInfo;
	}

	public int getState() {
		return state;
	}

	public String getStateInfo() {
		return stateInfo;
	}

	public static GZHUserOperationStateEnum stateOf(int index) {
		for (GZHUserOperationStateEnum state : values()) {
			if (state.getState() == index) {
				return state;
			}
		}
		return null;
	}

}
